//
// CAudioCaptureFilter2.h
//

#ifndef __H_CAudioCaptureFilter2__
#define __H_CAudioCaptureFilter2__

#include <afxtempl.h>
#include "CDXFilter.h"

class CAudioInput
{
public:
	CString   mInputName;
	IPin *    mInputPin;   // NOT outstanding reference

	CAudioInput() {};
	~CAudioInput() {};
};

typedef CList<CAudioInput, CAudioInput&>  INPUT_LIST;

class CAVDevice;
class CAudioCaptureFilter2 : public CDXFilter  
{
private:
	INPUT_LIST		mInputList;
	CAVDevice *		mDevice;

public:
	CAudioCaptureFilter2(IGraphBuilder * inGraph);
	virtual ~CAudioCaptureFilter2(void);

	void SetDevice(CAVDevice * inDevice);
	virtual BOOL CreateFilter(void);

	long GetConnectorCount(void);
	CString GetConnectorName(long inIndex);
	void SetConnector(long inIndex);
	long GetConnector(void);
	void SetMixLevel(double inLevel);

private:
	void SetDefaultInputPin(void);
	void SetCaptureBufferSize(void);

	void BuildInputList(void);
	IAMAudioInputMixer * GetMixer(IPin * inPin);
};

#endif // __H_CAudioCaptureFilter2__
